package com.leeon.inner;

/**
 * 成员内部类
 *
 * 编译后成生成两个.class 文件
 * Outer.class
 * Outer$Inner.class;
 *
 */
public class FieldInnerClass {
    private static int i = 1;
    private int j=10;
    private int k=20;

    public void outerSay(){
        System.out.println("outerSay j = " + j);
    }


    public class Inner{
        public Inner(){

        }

        public void  innerSay(){
            System.out.println("innerSay i = " + i);
        }
    }

    public static void main(String[] args){
        FieldInnerClass outer = new FieldInnerClass();

        FieldInnerClass.Inner inner = outer.new Inner();

        inner.innerSay();
    }

}
